package com.hclc.entity.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.hclc.entity.model.series.CustomLocalDateTimeSerializer;
import com.hclc.entity.model.series.DeCustomLocalDateTimeSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>任务日志记录表</p>
 * @author hef
 * @since 2020-11-09
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Accessors(chain = true)
@TableName("`t_job_logs`")
public class JobLogsModel implements Serializable {

	private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value="`id`", type= IdType.ASSIGN_ID)
	@ApiModelProperty(value = "id")
    private String id;

    /**
     * 日志内容
     */
    @TableField(value = "`content`")
	@ApiModelProperty(value = "日志内容")
    private String content;

    /**
     * 日志输入时间
     */
    @TableField(value = "`log_datetime`")
	@ApiModelProperty(value = "日志输入时间")
    @JsonDeserialize(using = DeCustomLocalDateTimeSerializer.class)
    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime logDatetime;

    /**
     * 任务记录id
     */
    @TableField(value = "`job_record_id`")
	@ApiModelProperty(value = "任务记录id")
    private String jobRecordId;

    /**
     * 任务id
     */
    @TableField(value = "`job_id`")
	@ApiModelProperty(value = "任务id")
    private String jobId;

    /**
     * 更新时间
     */
    @TableField(value = "`update_time`", fill = FieldFill.INSERT_UPDATE)
	@ApiModelProperty(value = "更新时间")
    @JsonDeserialize(using = DeCustomLocalDateTimeSerializer.class)
    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime updateTime;

    /**
     * 创建时间
     */
    @TableField(value = "`create_time`", fill = FieldFill.INSERT)
	@ApiModelProperty(value = "创建时间")
    @JsonDeserialize(using = DeCustomLocalDateTimeSerializer.class)
    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime createTime;


}
